# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-file-rsync
_pkgreal=File-RsyncP
pkgver=0.76
pkgrel=5
pkgdesc="Perl rsync client"
url="https://metacpan.org/pod/File::RsyncP"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/C/CB/CBARRATT/File-RsyncP-$pkgver.tar.gz
	perl-file-rsync-parallell-build-fix.patch
	"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	chmod +w ./*/config.guess
	update_config_guess
	update_config_sub
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make config && make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="
b81d9ce63181605939e8aff87c9e56ab276899f019f44eb3f149e7ee0d44a94fcbee771381ebe6ca8281c2de0d57d9cbdbcb972ccb7406a0aefd920040603bb3  File-RsyncP-0.76.tar.gz
1b7ddad9d13bcad01760048670545d893c6eb9c0ed3bbb33b80f9c1520aea682c98233efeafa2f6de12e4b86de5895c648a67dfb2402d9877b428df3b06da972  perl-file-rsync-parallell-build-fix.patch
"
